﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="browser.aspx.cs" Inherits="Admin_Modules_Backend_browser" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>无标题页</title>
</head>

<script language="javascript">
function CreateDir()
{
	dirName = prompt('请输入文件夹名称:','');
	if ((dirName) && (dirName!=""))
	{
		document.forms['BrowseFiles'].elements['funcParam'].value = dirName;
		__doPostBack('CreateDir', '');
	}
}
function DeleteDir()
{
		__doPostBack('DeleteDir', '');
}
function Rename(path)
{
	newName = prompt('请为文件/文件夹输入新的名称:','');
	if ((newName) && (newName!=""))
	{
		document.forms['BrowseFiles'].elements['funcParam'].value = path;
		document.forms['BrowseFiles'].elements['funcExtraParam'].value = newName;
		__doPostBack('Rename', '');
	}
}
function popup_resize(pufile,puname,height,width,scrolls)
{
	var proto = location.protocol;
	var openerhost = location.host;
	var win=open(proto + pufile,puname,"resizable=yes,height=" + height + ",width=" + width + ",scrollbars=" + scrolls);
	win.focus();
	win.resizeTo(width,height);
}
</script>
<body>
<form id="BrowseFiles" method="post" enctype="multipart/form-data" runat="server">
<table>
	<tr>
		<td valign="top" align="center">
			
				<table width="400" align="center">
					<tr>
						<td width="100%" align="center">
							<table cellpadding="10" cellspacing="0" align="center">
								<TBODY>
									<tr>
										<td class="subsechead"></td>
										<td class="sectionhead" nowrap><%=FolderDescription%></td>
									</tr>
							</table>
					</tr>
					<tr>
						<td colspan="2" align="center">
							<table cellpadding="7" class="subsechead">
								<tr>
									<td valign="middle" align="center" nowrap><input type="hidden" id="funcParam" runat="server" NAME="funcParam"><input type="hidden" id="funcExtraParam" runat="server" NAME="funcExtraParam">
										&nbsp;<a href="javascript:CreateDir();">创建目录</a><asp:LinkButton ID="CreateDir" runat="server" OnClick="CreateDir_Click" /></td>
									<td valign="middle" align="center" nowrap><a href="javascript:DeleteDir();" onclick="return confirm('您确认要删除目录 [ <%=folderPath%> ]?');">删除目录
										</a>
										<asp:LinkButton ID="DeleteDir" runat="server" OnClick="DeleteDir_Click" />&nbsp;</td>
								</tr>
							</table>
						</td>
					</tr>
				</table>
				<asp:label id="StatusMessage" ForeColor="RED" runat="server" />
		</td>
	</tr>
	<tr>
		<td width="100%"><br>
			<i>目录列表...</i><br>
			<br>
			<% FillFoldersAndFilesTable(); %>
		</td>
	</tr>
	<tr>
		<td width="100%"><br>
			<i>上传文件到当前目录:</i><br>
			<br>
		</td>
	</tr>
	<tr>
		<td width="100%" align="center">
			<TABLE>
				<TR>
					<TD nowrap>选择文件: <input type="file" id="File1" name="File1" runat="server"></TD>
				</TR>
				<TR>
					<TD nowrap>选择文件: <input type="file" id="File2" name="File2" runat="server"></TD>
				</TR>
				<TR>
					<TD nowrap>选择文件: <input type="file" id="File3" name="File3" runat="server"></TD>
				</TR>
				<TR>
					<TD align="right" nowrap><br>
						<input type="hidden" id="fPath" name="Folder" runat="server"> <input type="button" value="上  传" runat="server" id="CmdUpload" onserverclick="UploadFile"
							NAME="CmdUpload">
					</TD>
				</TR>
			</TABLE>
		</td>
	</tr>
</table>
<asp:LinkButton ID="Rename" runat="server" OnClick="Rename_Click">重命名</asp:LinkButton>
</form>
</body>

</html>
